home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / tcl / tcl67.lha / tcl6.7 / doc / Concat.3 < prev    next >
Text File  |  1993-01-31  |  2KB  |  56 lines

  1. '\"
  2. '\" Copyright 1989 Regents of the University of California
  3. '\" Permission to use, copy, modify, and distribute this
  4. '\" documentation for any purpose and without fee is hereby
  5. '\" granted, provided that this notice appears in all copies.
  6. '\" The University of California makes no representations about
  7. '\" the suitability of this material for any purpose.  It is
  8. '\" provided "as is" without express or implied warranty.
  9. '\" 
  10. '\" $Header: /user6/ouster/tcl/man/RCS/Concat.3,v 1.4 93/01/31 15:35:29 ouster Exp $ SPRITE (Berkeley)
  11. '\" 
  12. .so man.macros
  13. .HS Tcl_Concat tcl
  14. .BS
  15. .SH NAME
  16. Tcl_Concat \- concatenate a collection of strings
  17. .SH SYNOPSIS
  18. .nf
  19. \fB#include <tcl.h>\fR
  20. .sp
  21. char *
  22. \fBTcl_Concat\fR(\fIargc, argv\fR)
  23. .SH ARGUMENTS
  24. .AP int argc in
  25. Number of strings.
  26. .AP char *argv[] in
  27. Array of strings to concatenate.  Must have \fIargc\fR entries.
  28. .BE
  29.  
  30. .SH DESCRIPTION
  31. .PP
  32. \fBTcl_Concat\fR is a utility procedure used by several of the
  33. Tcl commands.  Given a collection of strings, it concatenates
  34. them together into a single string, with the original strings
  35. separated by spaces.  This procedure behaves differently than
  36. \fBTcl_Merge\fR, in that the arguments are simply concatenated:
  37. no effort is made to ensure proper list structure.
  38. .VS
  39. However, in most common usage the arguments will all be proper
  40. lists themselves;  if this is true, then the result will also have
  41. proper list structure.
  42. .PP
  43. \fBTcl_Concat\fR eliminates leading and trailing white space as it
  44. copies strings from \fBargv\fR to the result.  If an element of
  45. \fBargv\fR consists of nothing but white space, then that string
  46. is ignored entirely.  This white-space removal was added to make
  47. the output of the \fBconcat\fR command cleaner-looking.
  48. .VE
  49. .PP
  50. The result string is dynamically allocated
  51. using \fBmalloc()\fR;  the caller must eventually release the space
  52. by calling \fBfree()\fR.
  53.  
  54. .SH KEYWORDS
  55. concatenate, strings
  56.